home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "modKEYCODE"
- Option Explicit
-
- 'KeyDown values (Scancode values in Decimal(Windows))
- Global Const SPACE_BAR = 32
- Global Const CURSOR_LEFT = 37
- Global Const CURSOR_RIGHT = 39
- Global Const CURSOR_UP = 38
- Global Const CURSOR_DOWN = 40
-
- 'Key flags
- Global Const SPACE_BAR_FLAG = 1
- Global Const CURSOR_LEFT_FLAG = 2
- Global Const CURSOR_RIGHT_FLAG = 4
- Global Const CURSOR_UP_FLAG = 8
- Global Const CURSOR_DOWN_FLAG = 16
-
- 'Global used to track keys
- Global giKeyState As Integer
-
- Function iCheckKey(riKeyFlag As Integer)
-
- 'Check if a given key is currently pressed
- 'riKeyFlag - key identifier
- 'True if key is pressed
-
- 'Test the flag for required key
- iCheckKey = giKeyState And riKeyFlag
- End Function
-